{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Title: #Three Divisors"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Difficulty: #Easy"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Category Title: #Algorithms"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Tag Slug: #math"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Name Translated: #数学"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solution Name: isThree"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Translated Title: #三除数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Translated Content:\n",
    "<p>给你一个整数 <code>n</code> 。如果 <code>n</code> <strong>恰好有三个正除数</strong> ，返回 <code>true</code><em> </em>；否则，返回<em> </em><code>false</code> 。</p>\n",
    "\n",
    "<p>如果存在整数 <code>k</code> ，满足 <code>n = k * m</code> ，那么整数 <code>m</code> 就是 <code>n</code> 的一个 <strong>除数</strong> 。</p>\n",
    "\n",
    "<p>&nbsp;</p>\n",
    "\n",
    "<p><strong>示例 1：</strong></p>\n",
    "\n",
    "<pre><strong>输入：</strong>n = 2\n",
    "<strong>输出：</strong>false\n",
    "<strong>解释：</strong>2 只有两个除数：1 和 2 。</pre>\n",
    "\n",
    "<p><strong>示例 2：</strong></p>\n",
    "\n",
    "<pre><strong>输入：</strong>n = 4\n",
    "<strong>输出：</strong>true\n",
    "<strong>解释：</strong>4 有三个除数：1、2 和 4 。\n",
    "</pre>\n",
    "\n",
    "<p>&nbsp;</p>\n",
    "\n",
    "<p><strong>提示：</strong></p>\n",
    "\n",
    "<ul>\n",
    "\t<li><code>1 &lt;= n &lt;= 10<sup>4</sup></code></li>\n",
    "</ul>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Description: [three-divisors](https://leetcode.cn/problems/three-divisors/description/)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solutions: [three-divisors](https://leetcode.cn/problems/three-divisors/solutions/)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_cases = ['2', '4']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "      list1=[]\n",
    "      for i in range(1,n+1):\n",
    "        b=n%i\n",
    "        if b ==0:\n",
    "          list1.append(b)\n",
    "      if len(list1)==3:\n",
    "        return True\n",
    "      else:\n",
    "        return False\n",
    "\n",
    "      \n",
    "\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cat = 0\n",
    "        i = 1\n",
    "        while i*i<=n:\n",
    "            if n%i == 0:\n",
    "                if(i!=n/i):\n",
    "                    cat = cat+2\n",
    "                else:\n",
    "                    cat = cat+1\n",
    "            i=i+1\n",
    "        return cat == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        n_sqrt = n**0.5\n",
    "        if int(n_sqrt) != n_sqrt or n == 1:\n",
    "            return False\n",
    "        for i in range(2,int(n_sqrt)):\n",
    "            if n % i == 0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 2\n",
    "        if n<3:\n",
    "            return False\n",
    "        for i in range(2,int(pow(n,0.5)+1)):\n",
    "            if n%i == 0:\n",
    "                if i*i == n:\n",
    "                    count += 1\n",
    "                else:\n",
    "                    count += 2\n",
    "            if count > 3:\n",
    "                return False\n",
    "        if count < 3:\n",
    "            return False\n",
    "        return True\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        s = isqrt(n)\n",
    "        # 平方根是否为整数，排除n=1的特殊情况\n",
    "        if s * s == n and s != 1:\n",
    "            # 平方根是否为质数\n",
    "            for i in range(2, isqrt(s)+1):\n",
    "                if s % i == 0:\n",
    "                    return False\n",
    "            return True\n",
    "        return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        s = sqrt(n)\n",
    "        if s.is_integer() and s != 1:\n",
    "            for i in range(2, int(sqrt(s)+1)):\n",
    "                if s % i == 0:\n",
    "                    return False\n",
    "            return True\n",
    "        return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        res = 0\n",
    "        for i in range(1,n):\n",
    "            if n % i == 0:\n",
    "                if i != n // i:\n",
    "                    res+=2\n",
    "                else:\n",
    "                    res+=1\n",
    "        return res==3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count=0\n",
    "        for i in range(1,n+1):\n",
    "            if n %i==0:\n",
    "                count+=1\n",
    "        return count==3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n<=3:\n",
    "            return False\n",
    "        count = 0\n",
    "        for i in range(2,n):\n",
    "            if n%i == 0 and i**2 != n:\n",
    "                return False\n",
    "            if n%i == 0 and i**2 == n:\n",
    "                count += 1\n",
    "        if count != 1:\n",
    "            return False\n",
    "        else:\n",
    "            return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 2\n",
    "        sqrt_n_floor = int(math.sqrt(n))\n",
    "        if n<3:\n",
    "            return False\n",
    "        for i in range(2,sqrt_n_floor+1):\n",
    "            if n%i == 0:\n",
    "                if i == sqrt_n_floor:\n",
    "                    count += 1\n",
    "                else:\n",
    "                    count += 2\n",
    "\n",
    "        if count != 3:\n",
    "            return False\n",
    "        return True\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        ans = []\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:ans.append(i)\n",
    "        return len(ans)==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        return n in [4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809\n",
    "        , 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        a=[4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809\n",
    "        , 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409]\n",
    "        return n in a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                count+=1\n",
    "        print(count)\n",
    "        return count==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 2\n",
    "        if n > 2:\n",
    "            for i in range(2, n - 1):\n",
    "                if n % i == 0:\n",
    "                    cnt += 1\n",
    "            return True if cnt == 3 else False\n",
    "        return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        n_sqrt = n**0.5\n",
    "        if int(n_sqrt) != n_sqrt or n == 1:\n",
    "            return False\n",
    "        for i in range(2,int(n_sqrt)):\n",
    "            if n % i == 0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        c = 2\n",
    "        if n <= 2:\n",
    "            return False\n",
    "        for i in range(2, int(n // 2) + 1):\n",
    "            if n % i == 0:\n",
    "                c += 1\n",
    "            if c > 3:\n",
    "                return False\n",
    "        return c == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        ns = set([4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409])\n",
    "        return n in ns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 2\n",
    "        if n<3:\n",
    "            return False\n",
    "        for i in range(2,int(pow(n,0.5)+1)):\n",
    "            if n%i == 0:\n",
    "                if i*i == n:\n",
    "                    count += 1\n",
    "                else:\n",
    "                    count += 2\n",
    "\n",
    "        if count != 3:\n",
    "            return False\n",
    "        return True\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        flag=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                flag+=1\n",
    "        return flag==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        result = []\n",
    "        for i in range(1, n+1):\n",
    "            if n % i == 0:\n",
    "                result.append(i)\n",
    "\n",
    "            if len(result) > 3:\n",
    "                return False\n",
    "        \n",
    "        if len(result) == 3:\n",
    "            return True\n",
    "        else:\n",
    "            return False\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from math import sqrt\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 0\n",
    "        i=1\n",
    "        while i*i <= n:\n",
    "            if n%i==0:\n",
    "                if i!= n//i:\n",
    "                    cnt+=2\n",
    "                else:\n",
    "                    cnt+=1\n",
    "            i+=1\n",
    "        return cnt==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                count+=1\n",
    "        print(count)\n",
    "        return count==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n <=  3:\n",
    "            return False\n",
    "        count = 0\n",
    "        for i in range(2,int(n/2)+1):\n",
    "            if n % i == 0:\n",
    "                count += 1\n",
    "            if count > 1:\n",
    "                return False\n",
    "        print(count)\n",
    "        if count == 0:\n",
    "            return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        i = 2\n",
    "        ans = 0\n",
    "        while n > i:\n",
    "            if n % i == 0:\n",
    "                ans += 1\n",
    "                if ans > 1:\n",
    "                    return False\n",
    "            i += 1\n",
    "        return ans == 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        return len(list(filter(lambda x: n % x == 0, range(1, n + 1)))) == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        n_sqrt = n**0.5\n",
    "        if int(n_sqrt) != n_sqrt or n == 1:\n",
    "            return False\n",
    "        for i in range(2,int(n_sqrt)):\n",
    "            if n % i == 0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n==1:\n",
    "            return False\n",
    "        a=int(sqrt(n))\n",
    "        if a*a!=n:\n",
    "            return False\n",
    "        for i in range(2,int(sqrt(a))+1):\n",
    "            if a%i==0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        num=0\n",
    "        for x in range(1,n+1):\n",
    "            if n%x == 0:\n",
    "                num=num+1\n",
    "        if num ==3:\n",
    "            return True\n",
    "        else:\n",
    "            return False\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                count+=1\n",
    "                if count>3:\n",
    "                    break\n",
    "        return count==3 \n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        def pre(n):\n",
    "            if n < 3:\n",
    "                return n == 2\n",
    "            i = 1\n",
    "            while i * i < n:\n",
    "                i += 1\n",
    "                if not n % i:\n",
    "                    return False\n",
    "            return True\n",
    "        \n",
    "        return n**0.5 == int(n**0.5) and pre(n**0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "    # 三除数中包括了1和n本身，剩下的除数是唯一的即n的平方根\n",
    "        for i in range(2,n):    # for循环，除数的范围为[2，n)，暴力计算\n",
    "            if n % i == 0:      # 判断i是否可以被n整除\n",
    "                if i * i == n:  # 当i可以被n整除时，判断i是否是n的平方根\n",
    "                    return True     # 是平方根则输出true\n",
    "                else:\n",
    "                    return False    # 当i不是平方根时提前结束循环\n",
    "        return False\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "is_prime = [True] * 10000\n",
    "for i in range(2, 10000):\n",
    "    for j in range(i * i, 10000, i):\n",
    "        is_prime[j] = False\n",
    "is_prime[0] = is_prime[1] = False\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        i = int(n ** 0.5)\n",
    "        return is_prime[i] and i * i == n\n",
    "        \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        tem = 0\n",
    "        for i in range (1,n+1):\n",
    "            if n%i == 0:\n",
    "                tem = tem + 1\n",
    "        return tem == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        a=[4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809\n",
    "        , 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409]\n",
    "        return n in a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "\n",
    "        ds = {\n",
    "            4: True,\n",
    "            9: True,\n",
    "            25: True,\n",
    "            49: True,\n",
    "            121: True,\n",
    "            169: True,\n",
    "            289: True,\n",
    "            361: True,\n",
    "            529: True,\n",
    "            841: True,\n",
    "            961: True,\n",
    "            1369: True,\n",
    "            1681: True,\n",
    "            1849: True,\n",
    "            2209: True,\n",
    "            2809: True,\n",
    "            3481: True,\n",
    "            3721: True,\n",
    "            4489: True,\n",
    "            5041: True,\n",
    "            5329: True,\n",
    "            6241: True,\n",
    "            6889: True,\n",
    "            7921: True,\n",
    "            9409: True\n",
    "            }\n",
    "\n",
    "        return ds.get(n,False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n<2:\n",
    "            return False\n",
    "        if sqrt(n)!=int(sqrt(n)):\n",
    "            return False\n",
    "        for i in range(2,int(sqrt(n))):\n",
    "            if n%i==0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 0\n",
    "\n",
    "        for i in range(2, n):\n",
    "            if n % i == 0:\n",
    "                cnt += 1\n",
    "                if cnt > 1:\n",
    "                    return False\n",
    "        return True if cnt == 1 else False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from math import sqrt\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 0\n",
    "        i = 1\n",
    "        while i * i <= n:\n",
    "            if n % i == 0:\n",
    "                if i != n // i:\n",
    "                    # 此时 i 与 n / i 为不同整数\n",
    "                    cnt += 2\n",
    "                else:\n",
    "                    # 此时 i 与 n / i 相等\n",
    "                    cnt += 1\n",
    "            i += 1\n",
    "        return cnt == 3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n<=3:\n",
    "            return False\n",
    "        count = 0\n",
    "        for i in range(2,n):\n",
    "            if n%i == 0 and i**2 != n:\n",
    "                return False\n",
    "            if n%i == 0 and i**2 == n:\n",
    "                count += 1\n",
    "        if count != 1:\n",
    "            return False\n",
    "        else:\n",
    "            return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        a=[4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809\n",
    "        , 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409]\n",
    "        return n in a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        m=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i ==0:\n",
    "                m+=1\n",
    "        if m==3:\n",
    "            return True\n",
    "        else:\n",
    "            return False\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt, i = 0, 1\n",
    "        while i * i <= n:\n",
    "            if not n % i:\n",
    "                if i != n // i:\n",
    "                    # 此时 i 与 n / i 为不同整数\n",
    "                    cnt += 2\n",
    "                else:\n",
    "                    # 此时 i 与 n / i 相等\n",
    "                    cnt += 1\n",
    "            i += 1\n",
    "        return cnt == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 0\n",
    "        i = 1\n",
    "        while i*i <= n:\n",
    "            if n%i == 0:\n",
    "                if n//i == i:\n",
    "                    cnt+=1\n",
    "                else:\n",
    "                    cnt+=2\n",
    "            i = i+1\n",
    "        return cnt ==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        def isPrime(m):\n",
    "            if m == 2:\n",
    "                return True\n",
    "            if m % 2 == 0:\n",
    "                return False\n",
    "            if m < 2:\n",
    "                return False\n",
    "            for i in range(2, int(sqrt(m)) + 1):\n",
    "                if m % i == 0:\n",
    "                    return False\n",
    "            return True\n",
    "\n",
    "        return sqrt(n) == int(sqrt(n)) and isPrime(sqrt(n))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        return sum(n % i == 0 for i in range(1, n+1)) == 3\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        x = sqrt(n)\n",
    "        if (x == 1) or  (x % 1 != 0):\n",
    "            return False\n",
    "        for i in range(3,int(x)):\n",
    "            if x % i == 0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        k = 1\n",
    "        m = 0\n",
    "        while k <= n:\n",
    "          if n % k == 0:\n",
    "              m = m + 1\n",
    "          k += 1\n",
    "        if m == 3:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "import math\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        #4, \n",
    "        def isPrime(num):\n",
    "            if num <= 1:\n",
    "                return False\n",
    "            for i in range(2, int(math.sqrt(num)) + 1):\n",
    "                if num % i == 0:\n",
    "                    return False\n",
    "            return True\n",
    "        if n <= 1:\n",
    "            return False\n",
    "\n",
    "        root = math.sqrt(n)\n",
    "        if root == int(root):\n",
    "            return isPrime((root))\n",
    "        return False\n",
    "                \n",
    "\n",
    "        \n",
    "\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count=0\n",
    "        for i in range(2,n):\n",
    "            if n%i==0:\n",
    "                count+=1            \n",
    "        if count==1:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 2\n",
    "        sqrt_n_floor = int(math.sqrt(n))\n",
    "        if n<3:\n",
    "            return False\n",
    "        for i in range(2,sqrt_n_floor+1):\n",
    "            if n%i == 0:\n",
    "                if i == sqrt_n_floor:\n",
    "                    count += 1\n",
    "                else:\n",
    "                    count += 2\n",
    "\n",
    "        if count != 3:\n",
    "            return False\n",
    "        return True\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from math import sqrt\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 0\n",
    "        i = 1\n",
    "        while i * i <= n:\n",
    "            if n % i == 0:\n",
    "                if i != n // i:\n",
    "                    cnt += 2\n",
    "                else:\n",
    "                    cnt += 1\n",
    "            i += 1\n",
    "        return cnt == 3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 0\n",
    "        for i in range(1, n+1):\n",
    "            if n%i == 0:\n",
    "                count += 1\n",
    "        if count == 3:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        ans = 1\n",
    "        for i in range(1, n):\n",
    "            if n % i == 0:\n",
    "                ans += 1\n",
    "            if ans > 3:\n",
    "                return False\n",
    "        if ans != 3:\n",
    "            return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                count +=1\n",
    "\n",
    "            if count > 3:\n",
    "                return False\n",
    "\n",
    "        \n",
    "        if count ==3:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from math import sqrt\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        res = 0\n",
    "        end=int(sqrt(n))\n",
    "        for i in range(1,end+1):\n",
    "            if n % i == 0:\n",
    "                if i != n // i:\n",
    "                    res+=2\n",
    "                else:\n",
    "                    res+=1\n",
    "        return res==3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        ans=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                ans+=1\n",
    "        \n",
    "        if ans==3:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = Counter()\n",
    "        for i in range(2, n):\n",
    "            if n % i == 0:\n",
    "                cnt[i] = 1\n",
    "                cnt[n//i] = 1\n",
    "        return len(cnt) == 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        x=[i for i in range(1,n+1) if n%i==0]\n",
    "        return len(x)==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        a = n**0.5\n",
    "        b = a**0.5\n",
    "        i=2\n",
    "        if a%1!=0:\n",
    "            return False\n",
    "        if a<2:\n",
    "            return False\n",
    "        if a==2:\n",
    "            return True\n",
    "        while i <= b:\n",
    "            if a%i==0:\n",
    "                return False\n",
    "            i+=1\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from math import sqrt\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cmp = int(sqrt(n))#求平方根，是因为总是配套出现，从而避免重复计算即2x4=8，算了2就不用再寻找4了\n",
    "        cnt = 1 if n%cmp==0 else 0\n",
    "        for i in range(1,cmp):\n",
    "            if n % i == 0:\n",
    "                cnt += 2\n",
    "            if cnt > 3:\n",
    "                return False    \n",
    "        return cnt == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 1\n",
    "        for i in range(1,n//2 + 1):\n",
    "            if n % i == 0:\n",
    "                cnt += 1\n",
    "        if cnt == 3:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n < 4:\n",
    "            return False\n",
    "        x = n**0.5\n",
    "        if x % 1 != 0:\n",
    "            return False\n",
    "        print(x)\n",
    "        for i in range(2, int(x/2)):\n",
    "            if x%i == 0:\n",
    "                return False\n",
    "        return True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "MX = 10**4+1\n",
    "res = []\n",
    "is_prime = [True]*MX\n",
    "for i in range(2,MX):\n",
    "    if is_prime[i]:\n",
    "        res.append(i)\n",
    "    for j in range(i*i,MX,i):\n",
    "        is_prime[j] = False\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        return int(math.sqrt(n))==math.sqrt(n) and math.sqrt(n) in res\n",
    "        \n",
    "\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt = 0\n",
    "        for i in range(1, n // 2 + 1):\n",
    "            if n % i == 0:\n",
    "                cnt += 1\n",
    "                cnt += (n // i != i)\n",
    "        print(cnt)\n",
    "        return cnt == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 0\n",
    "        for m in range(1,n+1):\n",
    "            if n % m == 0:\n",
    "                count += 1\n",
    "        if count == 3:\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        c=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                c+=1\n",
    "            if c>3:\n",
    "                return False\n",
    "        return c==3\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "import math\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        count = 0\n",
    "        for i in range(1, int(math.sqrt(n)) + 1):\n",
    "            if n % i == 0:\n",
    "                # i 是一个正除数\n",
    "                count += 1\n",
    "                if i != n // i:\n",
    "                    # n // i 也是一个正除数\n",
    "                    count += 1\n",
    "                \n",
    "                # 如果超过3个正除数，直接返回 False\n",
    "                if count > 3:\n",
    "                    return False\n",
    "                \n",
    "        return count == 3\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "# import math\n",
    "# class Solution:\n",
    "#     def isThree(self, n: int) -> bool:\n",
    "#         tmp=math.sqrt(n)\n",
    "#         if tmp%1!=0:return False\n",
    "#         for i in range(2,int(tmp)):\n",
    "#             if n%i==0:\n",
    "#                 return False\n",
    "#         return n!=1\n",
    "        \n",
    "### 官解\n",
    "class Solution:\n",
    "    def isThree(self,n):\n",
    "        cnt=0\n",
    "        i=1\n",
    "        while i*i<=n:\n",
    "            if n%i==0:\n",
    "                if i!=n//i:\n",
    "                    cnt+=2 # 此时 i 与 n / i 为不同整数\n",
    "                else:\n",
    "                    cnt+=1  # 此时 i 与 n / i 相等\n",
    "            i+=1\n",
    "        return cnt==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        cnt=0\n",
    "        for i in range(1,n+1):\n",
    "            if n%i==0:\n",
    "                cnt+=1\n",
    "                if cnt>3:\n",
    "                    break\n",
    "        return cnt==3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        res = []\n",
    "        for i in range(1, n+1):\n",
    "            if n / i == int(n / i):\n",
    "                res.append(i)\n",
    "        return len(res) == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n == 1 or n == 2:\n",
    "            return False\n",
    "        has_find = False\n",
    "        for i in range(2, n):\n",
    "            if n % i == 0:\n",
    "                if has_find:\n",
    "                    return False\n",
    "                has_find = True\n",
    "        return has_find"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        half_n=int(n / 2) + 1\n",
    "        res=0\n",
    "        for i in range(2, half_n):\n",
    "            if n % i == 0:\n",
    "                res+=1\n",
    "        return True if res==1 else False\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n <= 2:\n",
    "            return False\n",
    "        for i in range(2, int(n ** 0.5) + 1):\n",
    "            if n % i == 0:\n",
    "                if i != int(n ** 0.5):\n",
    "                    return False\n",
    "                else:\n",
    "                    return True\n",
    "        return False\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "      if n>1 and int(sqrt(n))**2 == n:\n",
    "        for i in range(2,int(sqrt(n))):\n",
    "          if n%i==0:\n",
    "            return False\n",
    "        return True\n",
    "      return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        res = []\n",
    "        for i in range(1, n+1):\n",
    "            if n / i == int(n/i):\n",
    "                res.append(i)\n",
    "        if len(res) > 3 or len(res) < 3:\n",
    "            return False\n",
    "        else:\n",
    "            return True\n",
    "          \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        res = []\n",
    "        for i in range(1, n+1):\n",
    "            if n / i == int(n / i):\n",
    "                res.append(i)\n",
    "        return len(res) == 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "import math\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        tmp=math.sqrt(n)\n",
    "        if tmp%1!=0:return False\n",
    "        for i in range(2,int(tmp)):\n",
    "            if n%i==0:\n",
    "                return False\n",
    "        return n!=1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        a=int(n**0.5)\n",
    "        if n==1:\n",
    "            return False\n",
    "        elif a==n**0.5:\n",
    "            for i in range(2,int(a**0.5)+1):\n",
    "                if a%i==0:\n",
    "                    return False\n",
    "            return True\n",
    "        else:\n",
    "            return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def isThree(self, n: int) -> bool:\n",
    "        if n==1:\n",
    "            return False\n",
    "        a=n**0.5\n",
    "        if a!=int(n**0.5):\n",
    "            return False\n",
    "        else:\n",
    "            for i in range(2,n):\n",
    "                if n%i==0 and i!=a:\n",
    "                    return False\n",
    "        return True"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 2
}
